package com.kaifamiao.www.demo.D0719;

public class De05 {
    public static void main(String[] args) {
        //引用数据类型
        int [] nums = new int[4];//动态初始化
        for (int i = 0;i < nums.length;i++){
            nums[i]=i;
        }
        int[] nums1 = {1,2,3,4};//静态初始化
        System.out.println(nums);//hash地址
        System.out.println(nums1);
        //
        System.out.println(nums == nums1);//fales
        int[] nums2 = nums;
        nums[0] = 9;
        //判断引用是否一样
        System.out.println(nums == nums2);//true
        System.out.println(nums2[0]);
    }
}
